package com.sojson.config.autoConfig.close.database.condition;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

import com.sojson.constant.Constant;

/**
 * 是否启动SpringSecurity
 * 
 * @author liu
 * @date 2021-04-28
 */
public class CloseDatabaseCondittion implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return Constant.PROPERTIES.get("so.database.enabled") == null;
    }

}